import request from "@/utils/request";

//获取列表
export function fetchList(params) {
  return request({
    url: "/system/visitSource/selectListByIp",
    method: "get",
    params,
  });
}

//获取访问详情列表
export function fetchDetailList(params) {
  return request({
    url: "/system/visitSource/selectDetailByIp",
    method: "get",
    params,
  });
}

export function fetchIPInfo(params) {
  return request({
    url: "/system/visitSource/getIpInfo",
    method: "get",
    params,
  });
}

//访问状态分布
export function fetchVisitStatus(params) {
  return request({
    url: "/system/visitSource/getErrorData",
    method: "get",
    params,
  });
}

//近7天访问量
export function fetch7DaysVisits(params) {
  return request({
    url: "/system/visitSource/getIpVisits",
    method: "get",
    params,
  });
}

//访问流量分析 上行
export function fetchUpFlow(params) {
  return request({
    url: "/system/visitSource/flowAnalysis",
    method: "get",
    params,
  });
}

//访问流量分析 下行
export function fetchDownFlow(params) {
  return request({
    url: "/system/visitSource/flowDownAnalysis",
    method: "get",
    params,
  });
}
